package com.iris.live.services.data.repositories.impl;

import com.iris.live.services.data.repositories.InitCustomCarConfigureRepository;
import com.iris.live.services.vo.customcarconfigure.InitCustomCarConfigureVo;
import org.springframework.stereotype.Repository;

import java.util.HashMap;
import java.util.List;
import java.util.Map;

/**
 * Created by yitianle on 2017/8/15.
 */
@Repository
public class InitCustomCarConfigureRepositoryImpl extends BaseRepository implements InitCustomCarConfigureRepository {

    @Override
    public List<InitCustomCarConfigureVo> initConfigure(Integer detailId, String bouId) throws Exception {
        String sql ="SELECT   \n" +
                        "boutique.classify_id as classifyId, \n" +
                        "boutique.product_num as boutiqueNo, \n" +
                        "boutique.type_id as typeId \n" +
                    "FROM \n"+
                        "custom_car_configure_detail AS boutique \n" +
                    "WHERE \n" +
                        "boutique.product_num = :bouId \n";
        Map<String,Object> params = new HashMap<>();
        params.put("bouId",bouId);
        return this.getList(sql,params);
    }
}
